﻿@model eduscrum.ViewModels.UserStoryVM
<div id="tbl_editUserStory">
    <table width="300">
    @using (Html.BeginForm("Edit", "UserStory", FormMethod.Post, new { name = "editUserStory" }))
    {
        @Html.ValidationSummary(true)
        @Html.Hidden("ProjectID", Model.Project.ProjectID.ToString());
        @Html.Hidden("UserStoryID", Model.UserStoryID.ToString())
        <tr>
            <td class="editor-label">
                @Html.LabelFor(model => model.Title)
            </td>
            <td class="editor-field">
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title)
            </td>
        </tr>
        <tr>
            <td class="editor-label">
                @Html.LabelFor(model => model.StoryPoints)
            </td>
            <td class="editor-field">
                @Html.EditorFor(model => model.StoryPoints)
                @Html.ValidationMessageFor(model => model.StoryPoints)
            </td>
        </tr>
        <tr>
            <td class="editor-label">
                @Html.LabelFor(model => model.Priority)
            </td>
            <td class="editor-field">
                @Html.EditorFor(model => model.Priority)
                @Html.ValidationMessageFor(model => model.Priority)
            </td>
        </tr>
        <tr>
            <td class="editor-label">
                @Html.LabelFor(model => model.Description)
            </td>
            <td class="editor-field">
                @Html.TextAreaFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </td>
        </tr>
        <tr>
            <td colspan="2" align="right">
                <input type="image" src="@Url.Content("~/images/save.png")" alt="Save" title="Save" />
                <img onclick="deleteItem('User Story', '@Url.Content("~/UserStory/Delete/")' + document.forms['editUserStory']['UserStoryID'].value)" src="@Url.Content("~/images/delete.png")" title="Delete" alt="Delete" class="icon" />
            </td>
        </tr>
    }
    </table>
</div>
